import request from './request'
// import axios from 'axios'
import qs from 'qs'
// 精品
export const GetJingPingData = () =>request.get('/products/recommend')
// 热门
export const ReMwnData = () =>request.get('/products/hot',)
// 全部商品 筛选商品 get请求带参数
export const GoodsApi = (params) =>request.get('/products',{params})
// 商品详情页面
export const GoodsxqApi = (id) =>request.get(`/products/${id}`)
// 手机验证码
export const sendSMSApi = (params) =>request.post('/sendSMS',qs.stringify(params))
// 登录
export const PhoneReginApi = (params) => request.post('/phoneRegin', qs.stringify(params))
// 获取用户信息 /shop/userProfiles
export const getUserInfoApi = () => request.get('/shop/userProfiles')
// 微信登录（这个接口必须用qs对数据进行格式化）
export const WeixinLoginApi = (params) => request.post(`/wechatUsers/PCLogin`, qs.stringify(params));
// 手机绑定微信 /wechatUsers/binding
export const bindWechatPhoneApi = (params) => request.post('/wechatUsers/binding',qs.stringify(params))
// 解绑微信
export const UnbindWechatPhoneApi = () => request.put('/wechatUsers/unbindingWeChat')